<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
require_once '../config/config.php';
$connection = mysql_connect(DB_HOST . ":" . DB_PORT, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection);

if (mysql_errno()) {
    echo "ket noi that bai den MySQL: " . mysql_error();
}
$query = "SELECT * FROM pages LIMIT 0, 15";

$data = mysql_query($query, $connection);

echo "<table border='1'>
<tr>
<td>pid</td>
<td>id</td>
<td>name</td>
<td>username</td>
<td>phone</td>
<td>likes</td>
<td>talking_about_count</td>
<td>catogory</td>
<td>link</td>
<td>url</td>
</tr>";

while ($row = mysql_fetch_assoc($data)) {

    echo "<tr>";
    echo "<td>" . $row['pid'] . "</td>";
    echo "<td>" . $row['id'] . "</td>";
    echo "<td>" . $row['name'] . "</td>";
    echo "<td>" . $row['username'] . "</td>";
    echo "<td>" . $row['phone'] . "</td>";
    echo "<td>" . $row['likes'] . "</td>";
    echo "<td>" . $row['talking_about_count'] . "</td>";
    echo "<td>" . $row['link'] . "</td>";
    echo "<td>" . $row['url'] . "</td>";

    echo "</tr>";
}
echo "</table>";

mysql_close($connection);
?>
